{"mode":"Blocks","workspace":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable id=\"_2.^beQjx|FGt38A,8(E\">myVariable</variable><variable type=\"broadcast_msg\" id=\"9B7$-6{bR=.WE^T6P(F-\">message1</variable><variable type=\"list\" arraylength=\"2\" id=\"s35oq#9@a{hUWSQXniyD\">length</variable></variables><block type=\"iq_events_when_started\" id=\".NsXwU_L.OuU1l7Sho$F\" x=\"1090\" y=\"190\"><next><block type=\"iq_drivetrain_set_turn_velocity\" id=\"S=k76m).Q/men%Y-RwA7\"><field name=\"UNITS\">pct</field><value name=\"VELOCITY\"><shadow type=\"math_number\" id=\"rSMNg]G4P$w=+9$HAbNN\"><field name=\"NUM\">80</field></shadow></value><next><block type=\"iq_control_forever\" id=\"5I4P{A7M3Zkj9kH7lU)1\"><statement name=\"SUBSTACK\"><block type=\"iq_drivetrain_drive_for\" id=\"xtbV3/dEW=%-`Q2r#laa\"><field name=\"DIRECTION\">fwd</field><field name=\"UNITS\">mm</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"?vmM_;zLq3B_g0~Z#?E7\"><field name=\"NUM\">425</field></shadow><block type=\"iq_operator_add\" id=\"IU_k]FNOjgn^%byJ{9+2\"><value name=\"NUM1\"><shadow type=\"math_number\" id=\"[gyud|HD8]N|OUHnd:M|\"><field name=\"NUM\">300</field></shadow><block type=\"iq_operator_add\" id=\",rW${Ap{_tkJlc;sJ|L*\"><value name=\"NUM1\"><shadow type=\"math_number\" id=\"Wzm#Fh#~k;MYRk|@Bq1I\"><field name=\"NUM\">300</field></shadow></value><value name=\"NUM2\"><shadow type=\"math_number\" id=\",{k4oJ,bB,`(G^OGX}BE\"><field name=\"NUM\">230</field></shadow></value></block></value><value name=\"NUM2\"><shadow type=\"math_number\" id=\"lJ/~gbsY)(2k{S6gMB5{\"><field name=\"NUM\">230</field></shadow></value></block></value><next><block type=\"iq_drivetrain_turn_for\" id=\";yofmO_:3u#|H.Pq8uK_\"><field name=\"TURNDIRECTION\">right</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"ng{NniuCS!9G5rZ!*~.W\"><field name=\"NUM\">100</field></shadow></value><next><block type=\"iq_drivetrain_drive_for\" id=\"HKGo)cP{[J+F5_!w+kW4\"><field name=\"DIRECTION\">fwd</field><field name=\"UNITS\">mm</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"!mx.Xg4t.XLqYR9(]OI,\"><field name=\"NUM\">425</field></shadow><block type=\"iq_operator_add\" id=\"|zk3R=}8gxU$}FS@|-3j\"><value name=\"NUM1\"><shadow type=\"math_number\" id=\"yo=@,PV58-(heyQ,9U%D\"><field name=\"NUM\">300</field></shadow><block type=\"iq_operator_add\" id=\"Yd~UZB*;Ab.{ggV,`LE7\"><value name=\"NUM1\"><shadow type=\"math_number\" id=\"ZoVk:h{j:UP[Ugx2Ih+{\"><field name=\"NUM\">300</field></shadow></value><value name=\"NUM2\"><shadow type=\"math_number\" id=\"9TzCPrUWM6.[3ZFC:9o6\"><field name=\"NUM\">230</field></shadow></value></block></value><value name=\"NUM2\"><shadow type=\"math_number\" id=\"tIY+dVEQ#mGTmlQoUcs=\"><field name=\"NUM\">230</field></shadow></value></block></value><next><block type=\"iq_drivetrain_turn_for\" id=\"Ru/DEg5*(Vv0BQjv?7aa\"><field name=\"TURNDIRECTION\">right</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"*e{1/!Teh0=}}v/}HbrS\"><field name=\"NUM\">100</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></xml>","rconfig":[{"port":[3],"name":"Distance3","customName":false,"deviceType":"Distance","deviceClass":"sonar","setting":{},"triportSourcePort":22},{"port":[8],"name":"Bumper8","customName":false,"deviceType":"Bumper","deviceClass":"bumper","setting":{},"triportSourcePort":22},{"port":[9],"name":"Bumper9","customName":false,"deviceType":"Bumper","deviceClass":"bumper","setting":{},"triportSourcePort":22},{"port":[5],"name":"TouchLED5","customName":false,"deviceType":"TouchLED","deviceClass":"touchled","setting":{},"triportSourcePort":22},{"port":[1,6,4],"name":"Drivetrain","customName":false,"deviceType":"Drivetrain","deviceClass":"smartdrive","setting":{"type":"2-motor","wheelSize":"200mm","gearRatio":"1:1","direction":"fwd","gyroType":"smart","width":"173","unit":"mm","wheelbase":"76","wheelbaseUnit":"mm","xOffset":"0","yOffset":"0","thetaOffset":"0"}}],"slot":0,"platform":"IQ","sdkVersion":"20230627.09.00.00","appVersion":"3.0.0","minVersion":"3.0.0","fileFormat":"1.2.0","icon":"","targetBrainGen":"First","v5SoundsEnabled":false,"downloadLanguage":"python","cppStatus":"true","cpp":"// Make sure all required headers are included.\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdbool.h>\n#include <math.h>\n#include <string.h>\n\n\n#include \"vex.h\"\n\nusing namespace vex;\n\n// Brain should be defined by default\nbrain Brain;\n\n\n// START IQ MACROS\n#define waitUntil(condition)                                                   \\\n  do {                                                                         \\\n    wait(5, msec);                                                             \\\n  } while (!(condition))\n\n#define repeat(iterations)                                                     \\\n  for (int iterator = 0; iterator < iterations; iterator++)\n// END IQ MACROS\n\n\n// Robot configuration code.\nsonar Distance3 = sonar(PORT3);\nbumper Bumper8 = bumper(PORT8);\nbumper Bumper9 = bumper(PORT9);\ntouchled TouchLED5 = touchled(PORT5);\nmotor LeftDriveSmart = motor(PORT1, 1, false);\nmotor RightDriveSmart = motor(PORT6, 1, true);\ngyro DrivetrainGyro = gyro(PORT4, true);\nsmartdrive Drivetrain = smartdrive(LeftDriveSmart, RightDriveSmart, DrivetrainGyro, 200);\n\n\nvoid calibrateDrivetrain() {\n  wait(200, msec);\n  Brain.Screen.print(\"Calibrating\");\n  Brain.Screen.newLine();\n  Brain.Screen.print(\"Gyro\");\n  DrivetrainGyro.calibrate();\n  while (DrivetrainGyro.isCalibrating()) {\n    wait(25, msec);\n  }\n\n  // Clears the screen and returns the cursor to row 1, column 1.\n  Brain.Screen.clearScreen();\n  Brain.Screen.setCursor(1, 1);\n}\n\n// Generated code.\n\n// Include the IQ Library\n#include \"vex.h\"\n  \n// Allows for easier use of the VEX Library\nusing namespace vex;\n\nfloat myVariable;\n\nfloat length[2];\n\nevent message1 = event();\n\n// \"when started\" hat block\nint whenStarted1() {\n  Drivetrain.setTurnVelocity(80.0, percent);\n  while (true) {\n    Drivetrain.driveFor(forward, ((300.0 + 230.0) + 230.0), mm, true);\n    Drivetrain.turnFor(right, 100.0, degrees, true);\n    Drivetrain.driveFor(forward, ((300.0 + 230.0) + 230.0), mm, true);\n    Drivetrain.turnFor(right, 100.0, degrees, true);\n  wait(20, msec);\n  }\n  return 0;\n}\n\n\nint main() {\n  // Calibrate the Drivetrain Gyro\n  calibrateDrivetrain();\n\n  whenStarted1();\n}","target":"Physical"}